import request from '@/utils/request'

// 统计运输任务
export function getTransportTask() {
  return request({
    url: '/manager/transport-task-manager/count'
  })
}

// 统计车辆
export function getCount() {
  return request({
    url: '/manager/count'
  })
}

/**
 * 获取车辆类型信息列表
 */
export function getTruckType() {
  return request({
    url: '/manager/truckType/simple'
  })
}

/**
 * 获取机构树状图机构信息
 */
export function getTree() {
  return request({
    url: '/manager/business-hall/tree'
  })
}

/**
 * 获取线路分页数据
 */
export function getTransportLine(data) {
  return request({
    url: '/manager/transportLine/page',
    method: 'post',
    data
  })
}

/**
 * 获取车次-车辆绑定关系
 */
export function getTruckDrivers() {
  return request({
    url: '/manager/transportLine/trips/truckDrivers'
  })
}

/**
 * 获取运输任务分页数据
 */
export function getTransportPage(data) {
  return request({
    method: 'post',
    url: '/manager/transport-task-manager/page',
    data
  })
}

/**
 * 获取运输任务详情
 * get请求
 */
export function getdetail(id) {
  return request({
    url: `/manager/transport-task-manager/${id}`
  })
}
